<?php

class myUser extends sfGuardSecurityUser
{
	public function getFormObject($user_id =  null)
	{
		$user_id	= ($user_id == "") ? $this->getsfGuardUserProfile()->getIdsfGuardUserProfile() : $user_id;
		
		$user				= Doctrine::getTable('sfGuardUserProfile')->find($user_id);
		$this->object_form	= new sfGuardUserProfileForm($user);
		
		return $this->object_form->getObject();
	}
	
	public function getsfGuardUserProfile()
	{
		$user				= Doctrine::getTable('sfGuardUserProfile')->findByIdUsuario($this->getGuardUser()->getId());
		
		return $user[0];
	}
	
}
